package cn.sunagy.security.maz.admin.rpc;

import cn.sunagy.security.maz.admin.biz.GateLogBiz;
import cn.sunagy.security.maz.admin.entity.GateLog;
import cn.sunagy.security.maz.api.vo.log.LogInfo;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @desc：#TODO fill me ！
 * @author：三餘無夢生
 * @date：2018/6/2
 * @time：下午9:23
 */
@RequestMapping("api")
@RestController
public class LogRest {
    @Autowired
    private GateLogBiz gateLogBiz;
    @RequestMapping(value="/log/save",method = RequestMethod.POST)
    public @ResponseBody
    void saveLog(@RequestBody LogInfo info){
        GateLog log = new GateLog();
        BeanUtils.copyProperties(info,log);
        gateLogBiz.insertSelective(log);
    }
}

